package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.entity.AuditEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by Huqin on 2019/12/30
 */
public interface AuditEntityRepo extends
        PagingAndSortingRepository<AuditEntity, String>,
        JpaSpecificationExecutor<AuditEntity> {

    List<AuditEntity> findAllByApplicationIdOrderByCreateTime(String applicationId);

    List<AuditEntity> findAllByApplicationId(String applicationId);

    AuditEntity findFirstByApplicationIdOrderByCreateTimeDesc(String applicationId);

}
